home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / Misc / GMS / GMSDev / Includes / sound / sound.i < prev   
Encoding:
Text File  |  1997-11-01  |  4.4 KB  |  192 lines

  1.     IFND SOUND_SOUND_I
  2. SOUND_SOUND_I  SET  1
  3.  
  4. **
  5. **    $VER: sound.i V0.9B
  6. **
  7. **    Sound Definitions.
  8. **
  9. **    (C) Copyright 1996-1997 DreamWorld Productions.
  10. **        All Rights Reserved
  11. **
  12.  
  13.     IFND    DPKERNEL_I
  14.     include 'games/dpkernel.i'
  15.     ENDC
  16.  
  17. *****************************************************************************
  18. * Module definitions.
  19.  
  20. Snd_ModVersion  = 0
  21. Snd_ModRevision = 9
  22.  
  23. *****************************************************************************
  24. * Sound object.
  25.  
  26. SNDVERSION =    1
  27. TAGS_SOUND =    (ID_SPCTAGS<<16)|ID_SOUND
  28.  
  29.    STRUCTURE    SND,HEAD_SIZEOF
  30.     WORD    SND_LastChannel  ;Channel.
  31.     WORD    SND_Priority     ;Priority.
  32.     APTR    SND_Header       ;Sample info header, if any.
  33.     APTR    SND_Data         ;Address of sample data.
  34.     LONG    SND_Length       ;Length of sample data in bytes.
  35.     WORD    SND_Octave       ;Octave/Note setting.
  36.     WORD    SND_Volume       ;Volume of sample (1 - 100).
  37.     LONG    SND_Attrib       ;Sound attributes.
  38.     APTR    SND_Source       ;Where the sound comes from.
  39.     LONG    SND_Frequency    ;Frequency of sampled sound.
  40.  
  41.         *** Private fields start now ***
  42.  
  43.     BYTE    SND_AFlags       ;Private.
  44.     BYTE    SND_Pad          ;Private.
  45.  
  46. * Sound Tags.
  47.  
  48. SA_Priority  = SND_Priority|TWORD
  49. SA_Header    = SND_Header|TLONG
  50. SA_Data      = SND_Data|TLONG
  51. SA_Length    = SND_Length|TLONG
  52. SA_Octave    = SND_Octave|TWORD
  53. SA_Volume    = SND_Volume|TWORD
  54. SA_Attrib    = SND_Attrib|TLONG
  55. SA_Source    = SND_Source|TLONG
  56. SA_Frequency = SND_Frequency|TLONG
  57.  
  58. *** Flags for SND_Attrib.
  59.  
  60. ;B_SBIT16    =  0
  61. B_SMODVOL   =  1
  62. B_SMODPER   =  2
  63. B_SREPEAT   =  3
  64. B_SEMPTY    =  4
  65. B_SLEFT     =  5
  66. B_SRIGHT    =  6
  67. B_SFORCE    =  7
  68. B_SSTOPLAST =  8
  69.  
  70. ;SBIT8     = 0               ;Sound data is 8 bit.
  71. ;SBIT16    = 1<<B_SBIT16     ;Sound data is 16 bit.
  72. SMODVOL   = 1<<B_SMODVOL    ;Modulate volume with next channel.
  73. SMODPER   = 1<<B_SMODPER    ;Modulate period with next channel.
  74. SREPEAT   = 1<<B_SREPEAT    ;Repeat sample forever.
  75. SEMPTY    = 1<<B_SEMPTY     ;Only play if a channel is empty.
  76. SLEFT     = 1<<B_SLEFT      ;Preferably play through left speaker.
  77. SRIGHT    = 1<<B_SRIGHT     ;Preferably play through right speaker.
  78. SFORCE    = 1<<B_SFORCE     ;Only play through selected speaker.
  79. SSTOPLAST = 1<<B_SSTOPLAST  ;Only play through specified channel.
  80.  
  81. *****************************************************************************
  82. * Octave definitions for SND_Octave.  An 'S' at the end of an octave
  83. * definition indicates a sharp note.  The comments on the right tell
  84. * you the period resulting from the octant used.  This is good if
  85. * you are converting an old program that programmed the periods
  86. * directly.
  87.  
  88. OCT_G0S    =  0    ;068
  89. OCT_G0    =  2    ;072
  90. OCT_F0S    =  4    ;076
  91. OCT_F0    =  6    ;080
  92. OCT_E0    =  8    ;085
  93. OCT_D0S    =  10    ;090
  94. OCT_D0    =  12    ;095
  95. OCT_C0S    =  14    ;101
  96. OCT_C0  =  16    ;107
  97. OCT_B0    =  18    ;113
  98. OCT_A0S    =  20    ;120
  99. OCT_A0    =  22    ;127
  100.  
  101. OCT_G1S    =  24    ;135
  102. OCT_G1    =  26    ;143
  103. OCT_F1S    =  28    ;151
  104. OCT_F1    =  30    ;160
  105. OCT_E1    =  32    ;170
  106. OCT_D1S    =  34    ;180
  107. OCT_D1    =  36    ;190
  108. OCT_C1S    =  38    ;202
  109. OCT_C1    =  40    ;214
  110. OCT_B1    =  42    ;226
  111. OCT_A1S    =  44    ;240
  112. OCT_A1    =  46    ;254
  113.  
  114. OCT_G2S    =  48    ;269
  115. OCT_G2    =  50    ;285
  116. OCT_F2S    =  52    ;302
  117. OCT_F2    =  54    ;320
  118. OCT_E2    =  56    ;339
  119. OCT_D2S    =  58    ;360
  120. OCT_D2    =  60    ;381
  121. OCT_C2S    =  62    ;404
  122. OCT_C2    =  64    ;428
  123. OCT_B2    =  66    ;453
  124. OCT_A2S    =  68    ;480
  125. OCT_A2    =  70    ;508
  126.  
  127. OCT_G3S    =  72    ;538
  128. OCT_G3    =  74    ;570
  129. OCT_F3S    =  76    ;604
  130. OCT_F3    =  78    ;640
  131. OCT_E3    =  80    ;678
  132. OCT_D3S    =  82    ;720
  133. OCT_D3    =  84    ;762
  134. OCT_C3S    =  86    ;808
  135. OCT_C3    =  88    ;856
  136. OCT_B3    =  90    ;906
  137. OCT_A3S    =  92    ;960
  138. OCT_A3    =  94    ;1016
  139.  
  140. OCT_G4S =  96    ;1076
  141. OCT_G4  =  98    ;1140
  142. OCT_F4S =  100    ;1208
  143. OCT_F4  =  102    ;1280
  144. OCT_E4  =  104    ;1356
  145. OCT_D4S =  106    ;1440
  146. OCT_D4  =  108    ;1524
  147. OCT_C4S =  110    ;1616
  148. OCT_C4  =  112    ;1712
  149. OCT_B4  =  114    ;1812
  150. OCT_A4S =  116    ;1920
  151. OCT_A4  =  118    ;2032
  152.  
  153. OCT_G5S =  120    ;2152
  154. OCT_G5  =  122    ;2280
  155. OCT_F5S =  124    ;2416
  156. OCT_F5  =  126    ;2560
  157. OCT_E5  =  128    ;2712
  158. OCT_D5S =  130    ;2880
  159. OCT_D5  =  132    ;3048
  160. OCT_C5S =  134    ;3232
  161. OCT_C5  =  136    ;3424
  162. OCT_B5  =  138    ;3624
  163. OCT_A5S =  140    ;3840
  164. OCT_A5  =  142    ;4064
  165.  
  166. OCT_G6S =  144    ;4304
  167. OCT_G6  =  146    ;4560
  168. OCT_F6S =  148    ;4832
  169. OCT_F6  =  150    ;5120
  170. OCT_E6  =  152    ;5424
  171. OCT_D6S =  154    ;5760
  172. OCT_D6  =  156    ;6096
  173. OCT_C6S =  158    ;6464
  174. OCT_C6  =  160    ;6848
  175. OCT_B6  =  162    ;7248
  176. OCT_A6S =  164    ;7680
  177. OCT_A6  =  166    ;8128
  178.  
  179. OCT_G7S =  168    ;8608
  180. OCT_G7  =  170    ;9120
  181. OCT_F7S =  172    ;9664
  182. OCT_F7  =  174    ;10240
  183. OCT_E7  =  176    ;10848
  184. OCT_D7S =  178    ;11520
  185. OCT_D7  =  180    ;12192
  186. OCT_C7S =  182    ;12928
  187. OCT_C7  =  184    ;13696
  188. OCT_B7  =  186    ;14496
  189. OCT_A7S =  188    ;15360
  190.  
  191.     ENDC    ;SOUND_SOUND_I
  192.